const getApiPrefix = () => {
  let prefix = '';

  if (location.hostname == 'localhost') {
    prefix = '';
  } else if (location.hostname.includes('.sit')) {
    prefix = 'https://boss.sit.mcdonalds.cn/api/inner/grc-coreserv/';
  } else if (location.hostname.includes('.uat')) {
    prefix = 'https://boss.uat.mcdonalds.cn/api/inner/grc-coreserv/';
  } else {
    prefix = 'https://boss.mcdonalds.cn/api/inner/grc-coreserv/';
  }

  return prefix;
};

export const apiPrefix = getApiPrefix();

export const uploadUrl =
  'https://boss.mcdonalds.cn/api/inner/dfs-waterinspectionserv/dfs-waterinspectionserv/waterinspection/file/mcd/upload';

export const formScope = {
  __upload_image_url:
    'https://boss.mcdonalds.cn/api/inner/dfs-waterinspectionserv/dfs-waterinspectionserv/waterinspection/file/mcd/upload',
  __upload_file_url:
    'https://boss.mcdonalds.cn/api/inner/dfs-waterinspectionserv/dfs-waterinspectionserv/waterinspection/file/mcd/upload',
  tokenName: 'Authorization',
  navigateBarBackgroundColor: '#ffbc0d',
  navigateBarHeight: '78px',
};
